cmake_minimum_required(VERSION 3.18)

project(foreach LANGUAGES CXX)

# foreach(x RANGE 10)

#  message(STATUS "1:${x}")
    
# endforeach()


# foreach(x RANGE 10 20 3)

#  message(STATUS "2:${x}")
    
# endforeach()

# foreach(x "1" "2" "1;2;3")

#  message(STATUS "3:${x}")
    
# endforeach()



foreach(x IN ITEMS "1" "2" "1;2;3" )

message(STATUS "3:${x}")


endforeach()

set(L1 "1")
set(L2 "2;3;4")
set(L3 "abc")

foreach(x IN LISTS L1 L2 L3 )

message(STATUS "4:${x}")


endforeach()











